<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta content="App Inventor for Android" name="description">
    <meta content="Android, Blocks App Inventor, Mobile, Phone, IDE" name="keywords">
    <title>
      Not Ready For Prime Time Components - App Inventor for Android
    </title>
    <link href="/static/images/appinventor-16.png" rel="SHORTCUT ICON" type="image/ico">
    <link href="/static/images/appinventor-16.png" rel="icon" type="image/png">
    <link href="/static/css/appinventor.css" rel="stylesheet">
    <script src="http://www.google.com/js/gweb/analytics/autotrack.js">
</script>
    <script>
  var tracker = new gweb.analytics.AutoTrack({
        profile: 'UA-5856106-2'
      });
    </script>
    <style>
img.c3 {border-width:0}
    dt.c2 {font-weight: bold}
    div.c1 {clear:both;}
    </style>
  </head>
  <body>
    <div id="aiac">
      <div class="main-container">
        <div class="header">
          <div class="header-title">
            <a href="/about/"><img alt="" src="/static/images/appinventor_logo.gif"></a>
          </div>
          <form action="http://www.google.com/cse" id="cse-search-box">
            <input name="cx" type="hidden" value="011848991959401852367:xnrcbhk2zus"> <input name=
            "ie" type="hidden" value="UTF-8">
            <div class="header-search">
              <div class="header-search-query">
                <input class="textbox" name="q" type="text">
              </div>
              <div class="header-search-button">
                <input name="sa" src="/static/images/search-button.png" type="image">
              </div>
            </div>
          </form><script src="http://www.google.com/cse/brand?form=cse-search-box&amp;lang=en"
         >
</script>
          <div class="header-login">
            <div class="header-login-greeting">
              Learn about App Inventor
            </div>
          </div>
        </div>
        <div class="customhr customhr-green"></div>
        <div id="navigation">
          <div id="navigation-links">
            <div class="navigation-link-option" id="navigation-link-home">
              <a href="/about/">About</a>
            </div>
            <div class="navigation-link-option navigation-link-active" id="navigation-link-learn">
              <a href="/learn/">Learn</a>
            </div>
            <div class="navigation-link-option" id="navigation-link-forum">
              <a href="/forum/">Forum</a>
            </div>
            <div class="navigation-link-option" id="navigation-link-myappinventor">
              <a href="http://appinventor.googlelabs.com/ode/Ya.html" target="_blank">My
              Projects</a>
            </div>
          </div>
          <div id="navigation-breadcrumb">
            <a href="/learn/">Learn</a> &gt; <a href="/learn/reference/">Reference</a> &gt; Not
            Ready For Prime Time &gt;
          </div>
          <div class="c1"></div>
        </div>
        <div class="customhr customhr-gray"></div>
        <div class="content">
          <div class="content-body">
            <div class="learn-page">
              <h1>
                Not Ready for Prime Time Components
              </h1>
              <p>
                These components are experimental; the documentation is either missing or
                preliminary. Feel free to explore with them, but don't be surprised if they change
                in the near future.
              </p>
              <h2>
                Table of Contents
              </h2>
              <ul>
                <li>
                  <a href="#FusiontablesControl">FusiontablesControl</a>
                </li>
                <li>
                  <a href="#GameClient">GameClient</a>
                </li>
                <li>
                  <a href="#SoundRecorder">SoundRecorder</a>
                </li>
                <li>
                  <a href="#Voting">Voting</a>
                </li>
                <li>
                  <a href="#WebViewer">WebViewer</a>
                </li>
              </ul>
              <h2 id="FusiontablesControl">
                FusiontablesControl
              </h2><img alt="Picture of Fusion Tables component" src="images/fusiontables.png">
              <p>
                Google Fusion Tables lets you store, share, query and visualize data tables; this
                component lets you query, create, and modify these tables, using the <a href=
                "http://code.google.com/apis/fusiontables/docs/developers_reference.html" target=
                "_blank">Fusion Tables SQL API</a>.
              </p>To use the component, define a query, call DoQuery to execute the query, and
              GotResult will hand you the result when it is ready.
              <p>
                Note that you do not need to worry about encoding the query, but you do have to
                make sure it follows the syntax described in the reference manual, which means that
                things like capitalization for names of columns matter, and that single quotes must
                be used around column names if there are spaces in them.
              </p>
              <p>
                The results of the query will generally be returned in CSV format, and can be
                converted to list format using the "list from csv table" or "list from csv row"
                blocks.
              </p>
              <h3>
                Properties
              </h3>
              <dl>
                <dt>
                  <code>Query</code>: text (read-only)
                </dt>
                <dd>
                  The query to send to the Fusion Tables API.
                  <p>
                    For legal query formats and examples, see the Fusion Tables SQL API reference
                    manual.
                  </p>
                  <p>
                    Note that you do not need to worry about encoding the query, but you do have to
                    make sure it follows the syntax described in the reference manual, which means
                    that things like capitalization for names of columns matters, and that single
                    quotes need to be used around column names that contain.
                  </p>
                </dd>
              </dl>
              <h3>
                Events
              </h3>
              <dl>
                <dt>
                  <code>GotResult(text result)</code>
                </dt>
                <dd>
                  Indicates that the Fusion Tables query has finished processing, with a result.
                  The result of the query will generally be returned in CSV format, and can be
                  converted to list format using the "list from csv table" or "list from csv row"
                  blocks.
                </dd>
              </dl>
              <h3>
                Methods
              </h3>
              <dl>
                <dt>
                  <code>DoQuery()</code>
                </dt>
                <dd>
                  Send the query to the Fusion Tables server.
                </dd>
              </dl>
              <h2 id="GameClient">
                GameClient
              </h2><img alt="Picture of Game Client component" src="images/gameclient.png">
              <p>
                GameClient communicates with online game servers to support the implementation of
                multiplayer games. For information on the clients and servers and examples of
                games, see the MIT Master's Thesis by Bill Magnuson, <em>Building Blocks for Mobile
                Games</em> available at <a href=
                "http://dspace.mit.edu/handle/1721.1/61253">http://dspace.mit.edu/handle/1721.1/61253</a>.
                There is an experimental game server running at appinvgameserver.appspot.com, but
                this may be up only intermittently. For serious work, you will probably want to
                deploy your own game server on Google Appengine. The implementation is described in
                the thesis, and the code is available at
                http://code.google.com/p/app-inventor-for-android/source/browse/#svn/trunk/app_inv_game_server
              </p>
              <h3>
                Properties
              </h3>
              <dl>
                <dt>
                  <b>InstanceId</b>: text (read-only)
                </dt>
                <dd>
                  The game instance id. Taken together,the game ID and the instance ID uniquely
                  identify the game.
                </dd>
                <dt>
                  <b>InvitedInstances</b>: list (read-only)
                </dt>
                <dd>
                  The set of game instances to which this player has been invited but has not yet
                  joined. To ensure current values are returned, first invoke GetInstanceLists.
                </dd>
                <dt>
                  <b>JoinedInstances</b>: list (read-only)
                </dt>
                <dd>
                  The set of game instances in which this player is participating. To ensure
                  current values are returned, first invoke GetInstanceLists.
                </dd>
                <dt>
                  <b>Leader</b>: text (read-only)
                </dt>
                <dd>
                  The game's leader. At any time, each game instance has only one leader, but the
                  leader may change with time. Initially, the leader is the game instance creator.
                  Application writers determine special properties of the leader. The leader value
                  is updated each time a successful communication is made with the server.
                </dd>
                <dt>
                  <b>Players</b>: list (read-only)
                </dt>
                <dd>
                  The current set of players for this game instance. Each player is designated by
                  an email address, which is a string. The list of players is updated each time a
                  successful communication is made with the game server.
                </dd>
                <dt>
                  <b>PublicInstances</b>: list (read-only)
                </dt>
                <dd>
                  The set of game instances that have been marked public. To ensure current values
                  are returned, first invoke GetInstanceLists.
                </dd>
                <dt>
                  <b>ServiceUrl</b>: text (read-only)
                </dt>
                <dd>
                  The URL of the game server.
                </dd>
                <dt>
                  <b>UserEmailAddress</b>: text (read-write)
                </dt>
                <dd>
                  The email address that is being used as the player id for this game client. At
                  present, users must set this manually in order to join a game. But this property
                  will change in the future so that is set automatically, and users will not be
                  able to change it.
                </dd>
              </dl>
              <h3>
                Events
              </h3>
              <dl>
                <dt class="c2">
                  FunctionCompleted(text functionName)
                </dt>
                <dd>
                  Indicates that a function call completed.
                </dd>
                <dt class="c2">
                  GotMessage(text type, text sender, list contents)
                </dt>
                <dd>
                  Indicates that a new message has been received.
                </dd>
                <dt class="c2">
                  Info(text message)
                </dt>
                <dd>
                  Indicates that something has occurred which the player should know about.
                </dd>
                <dt class="c2">
                  InstanceIdChanged(text instanceId)
                </dt>
                <dd>
                  Indicates that the InstanceId property has changed as a result of calling
                  MakeNewInstance or SetInstance.
                </dd>
                <dt class="c2">
                  Invited(text instanceId)
                </dt>
                <dd>
                  Indicates that a user has been invited to this game instance.
                </dd>
                <dt class="c2">
                  NewInstanceMade(text instanceId)
                </dt>
                <dd>
                  Indicates that a new instance was successfully created after calling
                  MakeNewInstance.
                </dd>
                <dt class="c2">
                  NewLeader(text playerId)
                </dt>
                <dd>
                  Indicates that this game has a new leader as specified through SetLeader
                </dd>
                <dt class="c2">
                  PlayerJoined(text playerId)
                </dt>
                <dd>
                  Indicates that a new player has joined this game instance.
                </dd>
                <dt class="c2">
                  PlayerLeft(text playerId)
                </dt>
                <dd>
                  Indicates that a player has left this game instance.
                </dd>
                <dt class="c2">
                  ServerCommandFailure(text command, list arguments)
                </dt>
                <dd>
                  Indicates that a server command failed.
                </dd>
                <dt class="c2">
                  ServerCommandSuccess(text command, list response)
                </dt>
                <dd>
                  Indicates that a server command returned successfully.
                </dd>
                <dt class="c2">
                  UserEmailAddressSet(text emailAddress)
                </dt>
                <dd>
                  Indicates that the user email address has been set.
                </dd>
                <dt class="c2">
                  WebServiceError(text functionName, text message)
                </dt>
                <dd>
                  Indicates that an error occurred while communicating with the web server.
                </dd>
              </dl>
              <h3>
                Methods
              </h3>
              <dl>
                <dt>
                  <b>GetInstanceLists</b>()
                </dt>
                <dd>
                  Updates the InstancesJoined and InstancesInvited lists. This procedure can be
                  called before setting the InstanceId.
                </dd>
                <dt>
                  <b>GetMessages</b>(text type, number count)
                </dt>
                <dd>
                  Retrieves messages of the specified type.
                </dd>
                <dt>
                  <b>Invite</b>(text playerEmail)
                </dt>
                <dd>
                  Invites a player to this game instance.
                </dd>
                <dt>
                  <b>LeaveInstance</b>()
                </dt>
                <dd>
                  Leaves the current instance.
                </dd>
                <dt>
                  <b>MakeNewInstance</b>(text instanceId, boolean makePublic)
                </dt>
                <dd>
                  Asks the server to create a new instance of this game.
                </dd>
                <dt>
                  <b>SendMessage</b>(text type, list recipients, list contents)
                </dt>
                <dd>
                  Sends a keyed message to all recipients in the recipients list. The message will
                  consist of the contents list.
                </dd>
                <dt>
                  <b>ServerCommand</b>(text command, list arguments)
                </dt>
                <dd>
                  Sends the specified command to the game server.
                </dd>
                <dt>
                  <b>SetInstance</b>(text instanceId)
                </dt>
                <dd>
                  Sets InstanceId and joins the specified instance.
                </dd>
                <dt>
                  <b>SetLeader</b>(text playerEmail)
                </dt>
                <dd>
                  Tells the server to set the leader to playerId. Only the current leader may
                  successfully set a new leader.
                </dd>
              </dl>
              <h2 id="SoundRecorder">
                SoundRecorder
              </h2><img alt="Picture of Sound Recorder component" src="images/soundRecorder.png">
              <p>
                Multimedia component that records audio.
              </p>
              <h3>
                Properties
              </h3>none
              <h3>
                Events
              </h3>
              <dl>
                <dt>
                  <code>AfterSoundRecorded(text sound)</code>
                </dt>
                <dd>
                  Provides the location of the newly created sound.
                </dd>
                <dt>
                  <code>StartedRecording()</code>
                </dt>
                <dd>
                  Indicates that the recorder has started, and can be stopped.
                </dd>
                <dt>
                  <code>StoppedRecording()</code>
                </dt>
                <dd>
                  Indicates that the recorder has stopped, and can be started again.
                </dd>
              </dl>
              <h3>
                Methods
              </h3>
              <dl>
                <dt>
                  <code>Start</code>()
                </dt>
                <dd>
                  Starts recording.
                </dd>
                <dt>
                  <code>Stop</code>()
                </dt>
                <dd>
                  Stops recording.
                </dd>
              </dl>
              <h2 id="Voting">
                Voting
              </h2><img alt="Picture of Voting component" src="images/voting.png">
              <p>
                The Voting component communicates with a Web service to retrieve a ballot and send
                back users' votes.
              </p>
              <p>
                The application should call the method <code>RequestBallot</code>, usually in the
                <code>Initialize</code> event handler, in order to get the ballot question and
                options from the Web service (specified by the <code>ServiceURL</code> property).
                Depending on the response from the Web service, the system will raise one of the
                following three events:
              </p>
              <ol>
                <li>
                  <code>GotBallot</code>, indicating that the ballot question and options were
                  retrieved and the properties <code>BallotQuestion</code> and
                  <code>BallotOptions</code> have been set.
                </li>
                <li>
                  <code>NoOpenPoll</code>, indicating that no ballot question is available.
                </li>
                <li>
                  <code>WebServiceError</code>, indicating that the service did not provide a legal
                  response and providing an error messages.
                </li>
              </ol>
              <p>
                After getting the ballot, the application should allow the user to make a choice
                from among <code>BallotOptions</code> and set the property <code>UserChoice</code>
                to that choice. The application should also set <code>UserId</code> to specify
                which user is voting. Often, this will be set to the property
                <code>UserEmailAddress</code>, which specifies the email address associated with
                the phone.
              </p>
              <p>
                Once the application has set <code>UserChoice</code> and <code>UserId</code>, the
                application can call <code>SendBallot</code> to send this information to the Web
                service. If the service successfully receives the vote, the event
                <code>GotBallotConfirmation</code> will be raised. Otherwise, the event
                <code>WebServiceError</code> will be raised with the appropriate error message.
              </p>
              <h3>
                Properties
              </h3>
              <dl>
                <dt>
                  <code><em>BallotOptions</em></code>
                </dt>
                <dd>
                  The list of ballot options.
                </dd>
                <dt>
                  <code><em>BallotQuestion</em></code>
                </dt>
                <dd>
                  The question to be voted on.
                </dd>
                <dt>
                  <code>ServiceURL</code>
                </dt>
                <dd>
                  The URL of the Voting service
                </dd>
                <dt>
                  <code>UserChoice</code>
                </dt>
                <dd>
                  The ballot choice to send to the server, which must be set before
                  <code>SendBallot</code> is called. This must be one of
                  <code>BallotOptions</code>.
                </dd>
                <dt>
                  <code><em>UserEmailAddress</em></code>
                </dt>
                <dd>
                  The email address associated with this device.
                </dd>
                <dt>
                  <code>UserId</code>
                </dt>
                <dd>
                  A text identifying the voter that is sent to the Voting server along with the
                  vote. This must be set before <code>SendBallot</code> is called.
                </dd>
              </dl>
              <h3>
                Events
              </h3>
              <dl>
                <dt>
                  <code>GotBallot()</code>
                </dt>
                <dd>
                  Event indicating that a ballot was retrieved from the Web service and that the
                  properties <code>BallotQuestion</code> and <code>BallotOptions</code> have been
                  set. This is always preceded by a call to the method <code>RequestBallot</code>.
                </dd>
                <dt>
                  <code>GotBallotConfirmation()</code>
                </dt>
                <dd>
                  Event confirming that the Voting service received the ballot.
                </dd>
                <dt>
                  <code>NoOpenPoll()</code>
                </dt>
                <dd>
                  Event indicating that the service has no open poll.
                </dd>
                <dt>
                  <code>WebServiceError(text message)</code>
                </dt>
                <dd>
                  Event indicating that the communication with the Web service resulted in an
                  error.
                </dd>
              </dl>
              <h3>
                Methods
              </h3>
              <dl>
                <dt>
                  <code>RequestBallot()</code>
                </dt>
                <dd>
                  Send a request for a ballot to the Web service specified by the property
                  <code>ServiceURL</code>. When the completes, one of the following events will be
                  raised: <code>GotBallot</code>, <code>NoOpenPoll</code>, or
                  <code>WebServiceError</code>.
                </dd>
                <dt>
                  <code>SendBallot()</code>
                </dt>
                <dd>
                  Send a completed ballot to the Web service. This should not be called until the
                  properties <code>UserId</code> and <code>UserChoice</code> have been set by the
                  application.
                </dd>
              </dl>
              <h2 id="WebViewer">
                WebViewer
              </h2><img alt="Picture of WebViewer component" src="images/webviewer.png">
              <p>
                Component for viewing Web pages. The Home URL can be specified in the Designer or
                in the Blocks Editor. The view can be set to follow links when they are tapped, and
                users can fill in Web forms. Warning: This is not a full browser. For example,
                pressing the phone's hardware Back key will exit the app, rather than move back in
                the browser history.
              </p>
              <h3>
                Properties
              </h3>
              <dl>
                <dt>
                  <code><em>CurrentPageTitle</em></code>
                </dt>
                <dd>
                  Title of the page currently viewed
                </dd>
                <dt>
                  <code><em>CurrentUrl</em></code>
                </dt>
                <dd>
                  URL of the page currently viewed. This could be different from the Home URL if
                  new pages were visited by following links.
                </dd>
                <dt>
                  <code>FollowLinks</code>
                </dt>
                <dd>
                  Determines whether to follow links when they are tapped in the WebViewer. If you
                  follow links, you can use GoBack and GoForward to navigate the browser history.
                </dd>
                <dt>
                  <code>Height</code>
                </dt>
                <dt>
                  <code>HomeUrl</code>
                </dt>
                <dd>
                  URL of the page the WebViewer should initially open to. Setting this will load
                  the page.
                </dd>
                <dt>
                  <code>Visible</code>
                </dt>
                <dd>
                  Whether the component is visible
                </dd>
                <dt>
                  <code>Width</code>
                </dt>
              </dl>
              <h3>
                Events
              </h3>none
              <h3>
                Methods
              </h3>
              <dl>
                <dt>
                  <code>boolean CanGoBack()</code>
                </dt>
                <dd>
                  Returns true if the WebViewer can go back in the history list.
                </dd>
                <dt>
                  <code>boolean CanGoForward()</code>
                </dt>
                <dd>
                  Returns true if the WebViewer can go forward in the history list.
                </dd>
                <dt>
                  <code>GoBack()</code>
                </dt>
                <dd>
                  Go back to the previous page in the history list. Does nothing if there is no
                  previous page.
                </dd>
                <dt>
                  <code>GoForward()</code>
                </dt>
                <dd>
                  Go forward to the next page in the history list. Does nothing if there is no next
                  page.
                </dd>
                <dt>
                  <code>GoHome()</code>
                </dt>
                <dd>
                  Loads the home URL page. This happens automatically when the home URL is changed.
                </dd>
                <dt>
                  <code>GoToUrl(text url)</code>
                </dt>
                <dd>
                  Load the page at the given URL.
                </dd>
              </dl>
            </div>
          </div>
        </div>
        <div class="footer">
          <div class="footer-legal">
            <p>
              <a href="http://creativecommons.org/licenses/by/3.0/" rel="license"><img alt=
              "Creative Commons License" class="c3" src=
              "http://i.creativecommons.org/l/by/3.0/88x31.png"></a><br>
              This work is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/"
              rel="license">Creative Commons Attribution 3.0 Unported License</a> .
            </p>
            <p>
              ©2011 Google<br>
              <a href="/about/index.html">About</a> | <a href="/about/privacy.html">Privacy</a> |
              <a href="/about/termsofservice.html">Terms</a>
            </p>
          </div>
          <div class="footer-lastupdate">
            <script>
  if (document.lastModified != '') {
                var m = "Page last updated: " + document.lastModified;
                var p = m.length-8;
                document.writeln("<center>");
                document.write(m.substring(p, 0));
                document.writeln("<\/center>");
              }
            </script>
          </div>
        </div>
      </div>
    </div>
  </body>
</html>